import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'joy_main_tab_page.dart';

class JoySplashPage extends StatefulWidget {
  const JoySplashPage({super.key});

  @override
  State<JoySplashPage> createState() => _JoySplashPageState();
}

class _JoySplashPageState extends State<JoySplashPage> {
  @override
  void initState() {
    super.initState();
    _navigateToMainPage();
  }

  _navigateToMainPage() async {
    await Future.delayed(const Duration(milliseconds: 1800));
    if (mounted) {
      Get.offAll(() => const JoyMainTabPage());
    }
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Container(
        width: double.infinity,
        height: double.infinity,
        decoration: const BoxDecoration(
          image: DecorationImage(
            image: AssetImage('images/laugimage.png'),
            fit: BoxFit.cover,
          ),
        ),
      ),
    );
  }

}